package com.itheima.service.impl;

import com.itheima.bean.OrderDetail;
import com.itheima.dao.OrderDetailDao;
import com.itheima.service.OrderDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional
public class OrderDetailServiceImpl implements OrderDetailService {

    @Autowired
    private OrderDetailDao orderDetailDao;

    /**
     * 添加订单详情
     *
     * @param orderDetail
     * @return
     */
    @Override
    public int add(OrderDetail orderDetail) {
        return orderDetailDao.insert(orderDetail);
    }
}
